<template>
    <view class="goods_list">
        <view class="goods_item" v-for="item in goods" :key="item.id">
            <image :src="item.img_url"></image>

            <view class="price">
                <text>￥{{item.sell_price}}</text>
                <text class="decoration">￥{{item.market_price}}</text>
            </view>

            <view class="goods_name">
                {{item.title}}
            </view>
        </view>

    </view>
</template>

<script>
    export default {
        props: ['goods']
    }
</script>

<style lang="scss">
    .goods_list{
        padding: 0 15rpx;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        .goods_item{
            background-color: #fff;
            width: 340rpx;
            margin: 10rpx 0;
            padding: 15rpx 15rpx;
            box-sizing: border-box;
            image{
                width: 80%;
                height: 130px;
                display: block;
                margin: auto;
            }
        }
        .price{
            color: $shop-color;
            font-size: 36rpx;
            margin: 20rpx 0 10rpx 0;
            .decoration {
                color: #ccc;
                font-size: 28rpx;
                margin-left: 17rpx;
                text-decoration: line-through;
            }
        }
        .name {
            font-size: 28rpx;
            line-height: 50rpx;
            padding-bottom: 15rpx;
            padding-top: 10rpx;
        }
    }
</style>
